import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
/* REM */
import 'lib-flexible'
/* 样式 */
import './index.scss'
/* ANTD-MOBILE */
import { ConfigProvider } from "antd-mobile";
import enUS from 'antd-mobile/es/locales/en-US'
/* redux */
import { Provider } from 'react-redux'
import store from './store'

/* 处理最大宽度 */
(function () {
  const handleMax = () => {
    let html = document.documentElement,
      root = document.querySelector('#root'),
      deviceW = html.clientWidth;
    root.style.maxWidth = '750px'
    if (deviceW >= 750) {
      html.style.fontSize = '75px'
    }
  }
  handleMax();
})()

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <ConfigProvider locale={enUS}>
    <Provider store={store}>
      <App />
    </Provider>

  </ConfigProvider>
);
